<!-- /* Description for file.
 * 项目状态列表
 * @copyright     Copyright 2008-2010, PHInfo Services Inc. (http://www.phinfoservices.com)
 * @package       ues
 * @subpackage    ues/app/views/projectstates
 * @since         ues
 * @version       V0.0.1
 * @modifiedby    张海杰2011年0612
 * @lastmodified  张海杰2011年0728
 */
 -->



<?php
echo $html->css ( 'style' );
echo $html->css ( 'tab' );
echo $javascript->link ( 'jquery' );
?>
<script type="text/javascript">
	//删除多个
	function getDelStr() {
		$("#action").val("Del");
		
		var delArr = $("#f2 :checkbox:checked");
		if(delArr.length==0)
		{
			alert("请选择你要删除的项!");
			return;
		}
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			str += del;
			str += "/";
		}
		//window.alert(str);
		$("#delStr").val(str);
		//window.alert($("#delStr").val());
		$("#f2").submit();
	}
	//设为默认联系人
	function getStr() {
		$("#action").val("setDefault");
		//alert($("#action").val());
		var delArr = $("#f2 :checkbox:checked");
		if(delArr.length==0)
		{
			alert("请选择一个联系人!");
			return;
		}
		else if(delArr.length>1)
		{
			alert("请选择一个联系人!");
			return;
		}
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			str += del;
			str += "/";
		}
		//window.alert(str);
		$("#delStr").val(str);
		//window.alert($("#delStr").val());
		$("#f2").submit();
	}
	//联系项目
	function getLinkProject() {
		$("#action").val("linkProject");
		//alert($("#action").val());
		var delArr = $("#f2 :checkbox:checked");
		if(delArr.length!=1)
		{
			alert("请选择一个联系人!");
			return;
		}
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			str += del;
			str += "/";
		}
		//window.alert(str);
		$("#delStr").val(str);
		//window.alert($("#delStr").val());
		$("#f2").submit();
	}
	//联系记录
	function getLinkLog() {
		$("#action").val("linkLog");
		//alert($("#action").val());
		var delArr = $("#f2 :checkbox:checked");
		if(delArr.length==0)
		{
			alert("请选择联系人!");
			return;
		}
		var str = "";
		for(var i=0;i<delArr.length;i++) {
			var del = delArr[i].value;
			str += del;
			str += "/";
		}
		//window.alert(str);
		$("#delStr").val(str);
		//window.alert($("#delStr").val());
		$("#f2").submit();
	}
</script>
<!-- 当前位置-->
<div id="tabmenubar">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td class="tabmenubartitle1"><?php echo  __('YourPosition');//您现在的位置：?></td>
		<td class="tabmenubartitle2"><?php echo __('Customer Managements');//一级目录
										   echo '>';echo __('Customer Managements');//二级目录
										   echo '>';?>
									<?php echo $html->tag('span', __('Customer Managements Detail',true).'&nbsp;&nbsp;&nbsp;'.$thedetail['Companymanage']['name']);//当前操作地用span加粗?> 						  
		</td>
	</tr>
</table>
</div>
<!-- 当前位置-->
<table>
	<tr>
		<td width="50"></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetail/<?php echo $companymanage_id?>">基本信息</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/linkmanlist/<?php echo $companymanage_id?>">联系人</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/projectlist/<?php echo $companymanage_id?>">项目列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/initDetailRemark/<?php echo $companymanage_id?>">备注信息</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/contactallinfo/<?php echo $companymanage_id?>">联系日志</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/positionallinfo/<?php echo $companymanage_id?>">职位列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/contractmanagementlist/<?php echo $companymanage_id?>">合同管理</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/feemanageinit/<?php echo $companymanage_id?>">费用统计</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/staffallinfo/<?php echo $companymanage_id?>">企业员工</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/resumeReportAllinfo/<?php echo $companymanage_id?>">简历报告</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/appendixUpload/<?php echo $companymanage_id?>">附件列表</a></td>
		<td width="70"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/sameCompany/<?php echo $companymanage_id?>">同行公司</a></td>
	</tr>
</table>
<!-- 当前位置-->
<div>
</div>
<?php echo $form->create('Companymanage',array('action'=>'deletelinkman','type'=> 'post','id'=>'f2'));?>
<?php echo $form->hidden('delStr',array('name'=>'id','id'=>'delStr'));?>
<!-- 批量删除或设为默认-->
<?php echo $form->hidden('action',array('name'=>'action','id'=>'action'));?>
<?php echo $form->hidden('companymanage_id',array('name'=>'companymanage_id','id'=>'companymanage_id','default'=>$companymanage_id));?>

<!-- 项目状态列表 -->
<div id="nav1" style="width:97%">
<table width="100%" cellpadding="0" cellspacing="0" class="tab1">
	<tr>
		<th width="70px"><?php echo __('Selected');?></th>
		<th ><?php echo __('Companylinkman');//联系人?></th>
		<th ><?php echo __('linkmenenglishName');//英文名?></th>
		<th ><?php echo __('linkmendepartment');//部门?></th>
		<th ><?php echo __('Companylinkposition');//职务?></th>
		<th ><?php echo __('telephone');//电话?></th>
		<th ><?php echo __('Systemconfigs fax');//传真?></th>
		<th ><?php echo __('linkmenemail');//电子邮箱?></th>
		<th ><?php echo __('linkmenmobilePhone');//手机?></th>
		<th ><?php echo __('Companylinkman').__('otherMessage');//联系人备注?></th>
		<th ><?php echo __('Linkman isKey');//关键?></th>
		<th colspan="2" width="80px;"><?php echo __('Operate') ?></th>
	</tr>
	<!-- Here's where we loop through our $Notes array, printing out post info --> 
	
	<?php 
	foreach ($results as $datas): 
	
	?>
		<tr class=normal onmouseover='this.className= "over " '
			onmouseup='this.className= "over " '
			onmouseout='this.className= "normal " '>
			<td>
<!-- 批量删除选择 -->				
			<?php echo $form->checkbox($datas['Linkman']['id'], array('value' => $datas['Linkman']['id']));?>
			</td>
			<td title="<?php echo $datas['Linkman']['linkman']; ?>"><?php echo "<a onclick='window.open(\"".ROOT_WEB_PATH."/companymanages/linkmaninfo/".$datas['Linkman']['id']."\",\"mainFrame2\")'>".$datas['Linkman']['linkman']."</a>"; ?></td>
			<td title="<?php echo $datas['Linkman']['englishName']; ?>"><?php echo $datas['Linkman']['englishName']; ?></td>
			<td title="<?php echo $datas['Linkman']['department']; ?>"><?php echo $datas['Linkman']['department']; ?></td>
			<td title="<?php echo $datas['Linkman']['position']; ?>"><?php echo $datas['Linkman']['position']; ?></td>
			<td title="<?php echo $datas['Linkman']['tel']; ?>"><?php echo $datas['Linkman']['tel']; ?></td>
			<td title="<?php echo $datas['Linkman']['fax']; ?>"><?php echo $datas['Linkman']['fax']; ?></td>
			<td title="<?php echo $datas['Linkman']['email']; ?>"><?php echo "<a href='mailto:".$datas['Linkman']['email']."'>".$datas['Linkman']['email']."</a>" ; ?></td>
			<td title="<?php echo $datas['Linkman']['mobilePhone']; ?>"><?php echo $datas['Linkman']['mobilePhone']; ?></td>
			<td title="<?php echo $datas['Linkman']['memo']; ?>"><?php echo $datas['Linkman']['memo']; ?></td>
			<td><?php if($datas['Linkman']['iskey']==1){echo "是";}else{echo "否";} ?></td>
			<td>
			<?php echo $html->link( $html->image('delete.gif', array('alt' =>  __('Delete', true),'border'=>'0')), '/companymanages/deleteOneLinkman/'.$datas['Linkman']['id']."/".$companymanage_id, null, 
			__('Are you sure you want to delete', true) .' '. $datas['Linkman']['linkman'] . '?',array('escape'=>false));  ?> 		
			</td><!--  __('delete', true) 删除、提示 -->
			<td>
			<?php echo $html->link( $html->image('edit.gif', array('alt' =>  __('Edit', true),'border'=>'0')), '/companymanages/editlinkmaninit/'.$companymanage_id."/".$datas['Linkman']['id'], null,null,
			array('escape'=>false));  ?> 	
			</td><!--  __('edit', true) 修改 -->
		</tr> 
	<?php endforeach; ?>  
</table>
</div>

<!-- 项目状态列表 -->
<table width="50%" cellspacing="0" cellpadding="0" border="0" style="text-align: left">
	<tr>
		<td width="50"></td>
		 <td width="100"><a href='javascript:getLinkProject();' class="btn4"><?php //echo $html->image('setting.gif', array('alt' =>  __('Add', true),'border'=>'0'));?>
		 			联系项目</a>
		 </td>
		 <td width="120"><a onclick='getStr()' class="btn4"><?php //echo $html->image('setting.gif', array('alt' =>  __('Add', true),'border'=>'0'));?>
		 			设为默认</a>
		 </td>
		<td width="100"><a onclick='getDelStr()' class="btn2"><?php //echo $html->image('delete.gif', array('alt' =>  __('Delete', true),'border'=>'0','onclick'=>'getDelStr()'));?>删除</a>
		 </td>
		 <td width="100"><a href="<?php echo ROOT_WEB_PATH; ?>/companymanages/addlinkmaninit/<?php echo $companymanage_id?>" class="btn2"><?php //echo $html->image('add.gif', array('alt' =>  __('Add', true),'border'=>'0'));?>
		 			添加</a>
		 </td>
		 <td width="100"><a onclick='getLinkLog()' class="btn4"><?php //echo $html->image('setting.gif', array('alt' =>  __('Add', true),'border'=>'0'));?>
		 			联系日志</a>
		 </td>
		<td>&nbsp;</td>
	</tr>
</table>
<?php echo $form->end();?>